This will sound back woods.. but here is what I did..
My bike was idling rough and randomly between 500 RPM - 3000 RPM.. My dealer said they couldn't duplicate the problem. Funny, I duplicated it right there in the parking lot.
When I got the bike home, it was idling rough at 3,000 RPM. I figured I couldn't mess anything up worse, so I loosened the TPS and moved it back and forth. One way adds more fuel.. one way puts less fuel. I listened carefully and got slowly adjusted it until the bike was running smoothly. It was still idling at 3,000 RPM, but running great!
So.. I figured I would try backing off the idle stepper motor. I backed it off until the bike was idling at about 800 RPM.
I've put about 5,000 miles on it since then and it runs great!!!! I may need to bump the idle stepper motor up just a bit, as my bike now needs to warm up for a minute or so before it smooths out, but it runs great! and ALWAYS comes down to a smooth idle when I back off the throttle..