Check out the surging idle checklist in the 5.0 technical/how to forums, it shows you how to test things that cause your problem and how to fix/clean and reset stuff, don't assume it's any one thing, start at the top and do it step by step.
You guys with idle/stall problems could save a lot of time chasing your tails if you would go through the Surging Idle Checklist. Over 50 different people contributed information to it. The first two posts have all the fixes, and steps through the how to find and fix your idle problems without spending a lot of time and money. It includes how to dump the computer codes quickly and simply as one of the first steps. I continue to update it as more people post fixes or ask questions. You can post questions to that sticky and have your name and idle problem recognized. The guys with original problems and fixes get their posts added to the main fix.
It's free, I don't get anything for the use of it except knowing I helped a fellow Mustang enthusiast with his car. At last check, it had more than 250,000 hits, which indicates it does help fix idle problems quickly and inexpensively.