I had the same problem (didn't rev past 2500rpms and would stall spontaneously at stop lights) and found out that it was due to a faulty O2 sensor. I may be wrong of course and it may be the fuel pump or filter, but the symptoms sounds exactly to how my car was. You can temporarily fix this by resetting your ECU through your mechanic, but it only lasts for a short while...it's just better to get it replaced. It costed about $350 including labor. I hope the info helps and good luck!