Mazda Repair: Car stalls out when in gear come to stop., mazda mellenia, mass air flow sensor


Question
1996 Mazda Mellenia 2.5L V6 DOHC  The car starts easily.  When I put it in gear the idle speed becomes irregular and wants to die.  I can pump the accelerator to keep it running.  When I am driving it surge power spikes.  I drive it by putting it in nuetral to keep it running.  

Also, when the keys are out of the ignition, and the lights are off the doors will not lock from the inside and the bell rings, like the lights are on or keys are in ignition.
 Thank you for your time, if I need to get this fixed I would like to know what to ask for so I don't get taken for something possibly simple.

Answer
Hi Brian thanks for asking.
There are 3 components that i can think of right now that may cause this problem, I will need you or somebody to check them, Check The IAC Motor, check the Mass air flow sensor and check the EGR valve, Get back to me with your results.
Good Luck
Chris P