I used to spend a lot of time on this forum and remember ronjohn going through his nightmare while I was having one of my own. In my case (04 Rio 140K+), I had replaced timing belt but discovered I was a tooth off on the exhaust cam (cam timing marks sit slightly pigeon toed). Then I found a tiny intake leak, then the 1st cat was clogged. and after replacing the injectors/plugs/wires/coils/catalyst/O2 sensors/intake manifold gasket/TPS/ and cleaning the IACV, and testing fuel pump and fuel pressure, and purge solenoid and every connecter under the hood, I took it to dealer to have them do a ECU reprogram( service bulletin on it). They replaced an O2 sensor(again)and said it was good. It stalled on my way home!! I took off the IACV and replaced it, and the car ran perfectly after that! That little Rio was the most annoying vehicle I have ever dealt with! It is reasonably easy to work on, but it sure liked to throw codes that seemed to have little to do with the actual problems. Once I got it all figured out, it made sense, but the process drove me crazy! The wife made me sell it, but I did learn a few things. That IACV acts just like a intake leak. It makes the fuel trim change until it stalls the car, or freaks out the MAFS and TPS, which sets it to limp mode. And all along the way it loved to toss out misfire codes (along with a dozen others...).