Assuming that you don't have a problem with the radiator, thermostat, or water pump, my guess on the dancing gauge is that you have air in your cooling system. I just changed my water pump and had similar symptoms. When the temp sensor hits air, the temp goes up, then when it re-immerses in coolant, the temperature returns to normal.
I noticed that it takes several attempts to get the cooling system full of coolant after changing the water pump. The manual says the Explorer takes 8.6 quarts to refill, but I'd say it took 10-12 after having top and bottom radiator hoses and heater hoses disconnected.
The manual I had talked about "bleeding the cooling system" after changing the pump, but there's no specific way to bleed it. I had the temp gauge up past the "M" and didn't have any heat coming from the heater, which clearly indicated that the heater core was full of air. My solution was to park the Explorer facing uphill on a steep hill as my best attempt to "bleed" air from the system. I figured that if the radiator opening was the highest point in the cooling system, the air would have to bleed out. That appears to have worked, and my gauge is pegged right on the "N" to the "O", which is where I expect it to be.
------------------
"Whoever said you can't fool all of the people all of the time, was a damn fool" Vince McMahon, 1999