lets start with the code 51. it is indicating the throttle position sensor TPS is not communicating properly with the ECU. that can be due to the sensor being faulty(not likely), the throttle plate being kept from closing all the way(dirty throttle body), or corrosion on the contacts of the connectors at either end of the run. When I finally got mine to go away, I had to remove the TB both in order to clean it and to have access to the set screws for the TPS, as otherwise, the idle speed control valve needs to be removed to get access to the set screws. I tried just calibrating the TPS, but in the end, it was a dirty TB keeping me from accurately setting the TPS. Alot of people get the code and buy a new sensor not realizing it needs to be calibrated. it is easy enough with the right info (found here BTW >
For Sale - 40, 50, 60, and 80 series FSM for a hell of a price.) . anyway, clean the TB, you'll need a new gasket. you might want to go ahead and pull the ISCV idle speed control valve so order a gasket for that too. in fact, order egr inlet gasket too and just replace all the gaskets on your intake tract, that'll help toward fixing the lean condition the other code suggests...so we got gaskets and cleaned the TB and we're going to calibrate our TPS...Next, we're going to verify the harness is in tact to the ECU terminals, so using the FSM we downloaded and the info in the FI section showing the ECU pinout, we unplug the harness from the ECU and ohm the wires associated with the TPS and verify they are indeed feeding the info to the ECU. All of this also breaks any corrosion built up on the terminals which by itself may be doing wonders; alot of this stuff is low voltage and needs good clean contacts to flow.
I have only seen codes 25 and 26 together on my rig, which drove me nuts that it could be rich and lean at the same time, but I'm pretty phatt for such a skinny dude, so I know things like that can happen...in my case, the suggestion is that the O2 sensor circuit is phooey and that held true for me...in your case a code 25 would indeed indicate you are pulling air into the engine AFTER the AFM, so the ECU has no baseline to enrich to proper levels in accordance to the amount of actual airflow happening, right? so ANYWHERE post air cleaner that has a leaky gasket, cracked intake hoses, PCV vent tube cracked, VALVE COVER GASKET CRACKED believe it or not as air can be drawn into the block anywhere it can and enter the intake via the PCV system so oil cap off, bad dipstick stopper, pinhole in gaskets on the intake- will all make for a lean which will kill the engine. good news is all of these things need to be addressed anyway and they will all play valuable rolls in making the package hum as it should.
code 71 means the gas coming thru the egr intake is too cold by factory settings...this can mean your egr tract has a leak and is drawing in outside air(also potential for your leaning) thus making the gasses in the pipe too cold to have come from a properly fired exhaust stream and signaling a fault. it can also happen if the egr is not opening when it should- sticky valve, bypassed controls, faulty controls. it could be a faulty sensor but too often someone has replaced it and still got the same issue- it means something else is going on. only ignore it in cali if you are certain the egr is functioning as per FSM test process and so are the controls. It can sometimes just be that the ECU is expecting a higher value...if you want to ignore it and bypass it(not good in cal unless you are CERTAIN it is a false code) put a 10K ohm resistor in the circuit and the CEL will stop.
HTH but if you still wanna get rid of it, I'd be happy to take it to the junkyard for 20 bucks.