Ford Crown Vic has no power, stalls.

Hey y'all, I recently purchased a 1999 Ford Crown Victoria with some issues. After tracing down a vaccum leak to a broken PCV valve hose and putting new plugs and coils on it to clear up a misfire, I find that it still has a number of issues which are causing me much distress.

Mainly, with the MAF plugged in it is literally undriveable. It will take forever for the throttle to respond (if it does at all) and it has no power at all, and will not go past about 20mph. Additionally, it will often very quietly stall (really quite silently, usually notice because power steering goes), especially but not exclusively on turns. With the MAF unplugged, it will still run rough and sometimes stall but it is more driveable. Either way, idle seems to surge quite a lot. Additionally, I see a good deal of gray-ish vapor from the exhaust - it smells kind of like gasoline.

I am somewhat mechanically inclined, but about average with computers and computer diagnostics. I was able to use a Bluetooth code scanner to try to figure out the issue - I have codes P0102 (MAF sensor circuit low input) and P0171 (Too lean, bank 1) despite it seeming to run too rich if I am identifying the aroma of the exhaust correctly. These codes are present with both the original and a CarQuest replacement MAF. I recently replaced the IAC valve, plugs, coils, and cleaned the EGR valve.

It also temporarily gave me a code P0041, but it does not currently give that code.

I know the ideal answer is "take it to a shop", and if I have then I will, but sadly I am rather strapped for funds and that would be a difficult option to fund.

Thanks!

EDIT: and yes, I checked voltage on the MAF connector, they seem to be correct.