Good advice from Tony regarding the electrical side of things, I would also make a good check of all the rubber and plastic vaccum pipes and hoses on the engine for cracks, splits or holes that are letting air in and upsetting the engine causing rough running. A smoke test is my preferred method of testing this, the smoke will find those hard to spot leaks if you have any. Once started the engine management will try and compensate if you have vaccum leaks until it reaches the limit of correction it can do and will finally light up the EML on the dash. Have you read the codes with a scanner to see if its set any? If the starter motor spins over strongly when you start the car I would start checking out the vaccum pipes from Maf to exhaust. Worst case would be a duff Maf sensor as they are not cheap.