Vicoor's advice will probably lead you to the source of the new problem. But you might want to attend to the issues highlighted in the codes, maybe even before looking at VAFM and TPS.
The 22RE is a computer controlled, fuel injected motor. As in, the computer controls spark and fuel. And there are certain sensors which the computer absolutely needs in order to know when to spark, and when and how much to inject fuel. If the computer does not have reliable signals from all of the essential sensors, the motor has no hope whatsoever of running right. Those sensors are: 1. the pickup coil in the distrib, which lets the computer know the cam/crank position, 2. the TPS, to tell the computer how open the throttle is and when closed (idle), 3. the VAFM, which lets the computer know how much air is moving through the motor, and the air temp, and 4. the O2 sensor, without which the computer cannot calibrate fuel mixture. It's true that if there is no O2 sensor signal that the ecu will run in open loop mode in which the computer uses preset default values for fuel and spark timing, but that mode is designed for warmup and full throttle, and runs mixture too rich for normal operation. It will carbon-up the cyls and plugs and give very poor gas mileage. The final required sensor is the knock sensor, but only because the computer will throw a hissy fit if it's missing and refuse to run in closed loop.
So, first I would attend to the codes the computer is giving you. Get your O2 sensor wiring straightened out and make sure there's a good direct fit Denso or NTK (NGK) O2 sensor. The wiring connections have to be excellent, as the signal from the O2 sensor is a very low voltage and any resistance from a poor connection will cause the computer to believe the motor is running lean and it will inject too much fuel.
I recommend soldering any wire splices you have to make, coating the splice with dielectric grease, then sealing the area with heat shrink tubing (be sure to put the tubing over one of the wires b4 soldering, of course!). Here's a decent soldering tutorial:
Also make sure the knock sensor wiring is in good shape. The knock sensors themselves are very reliable and so it's unlikely to be the problem. This thread may help with that:
After the code issues are all taken care of, then following Vicoors advice, as mentioned, will probably lead you to the cause of the new problems. Good luck!