After the repair, go ahead and unplug the battery again for a few minutes to reset the pcm, it probably wont help but this step costs you nothing Also it might be a good idea to clean the throttle body, IAC and IAC passage. Also if somebody else has been messing with the idle, maybe they screwed the idle stop screw in and it needs to be backed out a little.
IAC or TPS can cause idle issues like this, along with a vacuum leak, which you probably fixed and have no others. Do a search for cleaning the IAC and T/B and if not then simply remove the IAC and clean the tip, along with cleaning the passage the IAC goes into, then manually open the throttle and clean the housing and throttle plate. Any decent carb cleaner and an old tooth brush and rag should be all you need.