i'd check for a vacuum leak 1st also. There is the wires going to your coil pack that be be brittle and causing you the same issues. The coil pack is the box where your plug wires plug into. Check the connector in front of it. Pull the it out and inspect the wires....
This is what mine looked like when I was having issues:
This is what mine looked like when I was having issues: