i was getting some o2 codes yes.
i have a tweecer rt so i can datalog my engine running so i can actually watch my o2 sensor voltages move around and they werent acting right, i knew something was amiss before i ever scanned the codes.
one of my o2s was reading ok, the other was reading dead lean when the car was actually running rich due to a baseline tune i was trying to work with. but since i wasnt getting good o2 feedback and never getting into CL (o2s fault) and never could do any useful tuning.
a good working grounded o2 should flucuate above and below .45 volts so the o2 actually reads "rich/lean/rich/lean/rich...." and will never settle on .45 volts (stoichiometric AFR of 14.7) its not supposed to settle they are supposed to switch from hgh to low.
one of my o2s wouldnt switch, since the sensor was bad it just read lean all the time and threw a code.
i went ahead and forked over the dough for 2 new o2s and threw them in, logged the car again and all seemed better. but then i started having problems again.
turned out i had some ground issues. the orange HEGO ground is just for the heating element of the o2 not the actually o2 itself. the metal case of the HEGO sensor itself must ground to the exhaust.
if there isnt a good ground then the voltage travels up the header and tries to go through the header bolts and then has to manage to try to jump past all the gaskets and etc, just not the best way to have it ground.
i mess with it and went to ACE and bought like 4 feet of 4 gauge wire (only used 3 feet) and 4 1/2" copper eyelets, cost me 15 bucks for it all.
starting out i bolted my small braided ground strap (behind drivers side cyl head) to the back of my drivers sied head. i bolted my orange HEGO ground down under an upper intake bolt.
i then relocated my main power ground to b/w a drivers side header bolt and header flange. it was originally on the timing cover is where i had it and there is has to jump gaskets or run through the water which can corrode and cause pitting on engine parts.
i then took out a motor mount bolt on the drivers side, then made a small ground wire, bolted it up b/w the motor mount bolt and the mount ( travels through bolt threads to get a GOOD connection to the block. i ran that wire to the old swaybar mount location (dont use swaybar) so i just bolted it down there.
then i unbolted one of the 4 bolts on the read of the H pipe i have, ran a small ground wire from there to a bolt sticking through the floor that fastens my DS safety loop on the car.
i also cleaned some other small grounds around the engine, like the EEC ground and etc, just sanded the eyes to clean shiny metal etc etc.
be sure to get soem sandpaper or something that you can scuff the metal and get good bare metal contact. its also not a bad idea to throw a small layer of primer on the connections to keep moisture out, but if you like in a relativly dry climate you should have any problems.
after i did this it seemed to cure my problems and my o2 seem to work good so far.
as for the TPS, you mentioned you replaced the sensor, if you just bolted it down that may be the problem.
take a good digital volt meter and then loosen the small screws holding the TPS down, snug just one up, but not tight enough to where you cant move the sensor around.
take the DVM and probe the green and black wires and then turn the key on, take the sensor and rotate it and watch the DVM, with the throttle 100% shut you should try and adjust it to where it read about .99V. snug it down when you get it there. then push the throttle open by hand, voltage should rise smoothly as you give it more throttle by hand, and at WOT it should read over 4V
if for some reason you cant adjust it to .99v or its not smooth reading with the moving throttle. then the sensor needs replaced.
a TPS out of whack can cause some small drivablilty issues, but a flat out bad sensor will cause alot more problems. my old 4cyl car had a bad sensor and tried to adjust it to .99 volt and it wouldnt do it the voltages went all over and the car ran funny, throttle response sucked etc. i replaced the sensor and cured the problem. the TPS is the main feedback to the EEC of what the driver is trying to do. so the EEC knows if the engine is trying to idle, accelerate or go WOT. without good feedback the EEC pretty much has to guess.