1995 Mercury Marquis

Engine Performance problem
1995 Mercury Marquis V8 Two Wheel Drive Automatic 147000 miles

I had a leak in the heater supply line ( it runs under the intake manifold) removed the manifold repaired the hose. At the same time I cleaned the egr channel in the throttle body ( it was clogged and the check engine light was on) Also the pcv line into the throttle body was leaking and I repaired that. After reassembling everything. The battery was disconnected throughtout the repair. I started the car, the check engine light was no longer on and it ran for about 2 minutes before shutting down. I found that the air filter was very dirty and tried running it without one with the same results. However when I ran the vehical with the air intake disconnected from the throttle body it stays running but after a few minutes it idles rough. At this point I suspected the MAF and tried running the car with everything assembled and the MAF disconnected, it ran but if I plug the sensor back in it stalls immediatly. So I figured it needs a new MAF sensor. After replacing the MAF sensor it still does the same thing.
I'm leaning toward the TPS (cleaning or replacing) But I want to avoid hit or miss part replacment.
July 31, 2010.

Clean out the idle air control valve and then test the throttle position sensor and intake air temperature sensor

Jul 31, 2010.