Computer codes rarely means a part is bad, so grain of salt.
The point of the code is to narrow down possible problems.
If a code definition mentions a sensor then it usually means that sensor is working or the problem wouldn't be reported
159 means MAF voltage is out of range, so most likely wiring issue
Look here:
http://www.therangerstation.com/tech_library/CleanMAF.shtml
Scroll down to TESTING
Have a volt meter set for DC Volts
get a couple a sewing needles to pierce the wires so you can test voltage while they are connected.
Wires A and B(in diagram) should have battery voltage, so a Ground and 12+ volts
Wires C and D are for the computer, its range is .1volt to 4.99volts, so 5 volt range.
MAF would send out close to 5volts at 6,000RPM, just before engine exploded, lol
Around 1 volt at idle
Test A and B with key on
Test C and D with engine running and rev it a few times, to see voltage change.
MAF sensor voltage is also compared to Throttle Position Sensor(TPS) voltage.
As you open the throttle, TPS voltage will increase, and the MAF sensor voltage should as well, more air is flowing.
TPS has 3 wires, top wire has 5volts
Center wire will have under 1 volt when throttle is closed, and above 4.5volts when throttle is wide open, this is what the computer uses.
So test TPS center wire using the sewing pin, key on but engine off
Ground volt meter
test voltage on center wire as you open and then close throttle, should be steady voltage not jumping or dropping out
Code 177 is O2 sensor on passenger side, if you have 2, is at 1volt and is not coming down when computer reduces the fuel on that bank.
O2 sensors only see oxygen, not fuel.
O2 sensor generates it's own voltage, .1v to 1volt
After fuel mix is burned in the engine there should be a known amount of oxygen in the exhaust.
Too much oxygen and O2 will have .1volt, computer calls this Lean
Too little oxygen and O2 will have 1volt, computer calls this Rich, code 177
Computer adjusts fuel mix on the fly and tries to keep O2 sensor voltage at .45 good even burn, not too much oxygen and not to little oxygen.
Computer can only increase or reduce the amount of fuel it adds in a limited range.
When it reaches that limit it sets a code like 177, it has reduces the fuel to its lower limit but O2 sensor voltage is still not going down to .45 volts
This could be an O2 sensor issue if O2 had over 150,000 miles on it
But could also be a wiring problem
But if engine is running rough it could be a leaky injector or Fuel Pressure regulator(FPR)
FPR has a vacuum hose attached, if FPR leaks, extra fuel will be sucked into the engine, causing over rich mix.
Pull off it's vacuum hose and check for fuel.
I would pull out a few spark plugs and see if they are darker brown or black, meaning engine IS running too rich