1996 Ram 1500 5.9 4x4 surging?

TPS [throttle position sensor] went on mine idled weird especially when you came to a stop idle would be high then real low finally even out only to start it all over again changed it out and all's well still got to clean/replace the IAC idles ok but just want to clean it up.