Rough idling/stalling on Mazda 626

Hooked the yellow ground to the car body. I have a Mazda 626 1998 4cyl with 106000 miles on it! Idling is rough as soon as I put a load on it. If I put the AC on, it stall! I changed the fuel filter, air filter , spark plugs, spark plugs wired, checked the EGR, cleaned both the Idle Air Control and Mass Air Flow sensor. The IAC was a little black but I do not see any improvement after cleaning it! Is it because you are supposed to reset the computer and if yes how do you do it? What else could be wrong??? This is killing me!