-I'd check the timing with the SpOUT connector removed. The computer automatically re-times the car, but if it is off it's base domain, then it will be out of range in certain spots, as in, unable to retard further, or unable to advance further. 13 degrees is a safe spot for a car that's misbehaving, go to 15 degrees when you get everything else figured out.
-then check the tps voltage, you can do this with the throttle body off of the car, but you have to use a multimeter that will put it's own power through. otherwise, have the key in the on position, and put one probe to the hot wire(green on fox's, and grey w/ white stripe for SN95). make sure that it's between .98-.99 volts. loosen and rotate the tps untill it is in proper range.
-then you will be poised to set the base idle.
-first off, I'd take off the Idle control valve, spray some brake cleaner in it and give it a good shake before the brake cleaner dries. do this a couple times to get all the gunk out of it. (just in case it liked to stick.)
-Then you disconnect the battery for 30 minutes, disconnect the idle control motor from the harness, reconnect battery and start her up. use the throttle plate stop screw to set the base idle. turn the car off, and reconnect the idle control motor. run the car for 2 minutes with all accessories OFF (radio, headlights, defrost, etc.). turn the car off. wait a couple more minutes and run the motor again, but with all accessories ON, for two minutes.
-that should do it! no more surging at idle, unless you have vacuum leaks. 5.0's don't have very many vacuum lines that lead to teh manifold so it shouldn't be too hard to track down. once the car has the proper throttle information feed, it can properly adjust gas and spark, reducing hanging rpm and acceleration cough.