I would start by checking the voltage at the MAF
Look here for specs:
http://www.therangerstation.com/tech_library/CleanMAF.html
I use sewing pins to pierce the wires I want to test while they are still connected.
Could simply be a loose ground causing voltage to swing out of range, or a shorted wire, while testing voltage move wiring harness around to see if it shorts out or changes
If voltage checks out then MAF may be bad, but usually you would get just 1 code like 157, not both, which is why i would check the wires and voltage.
I assume you are getting 157 and 158, but no other codes??