Well, your fist problem is to figure out what the wire is. Has it pulled loose from the ECM harness connecter? There shouldn't be any wiring inside the ECM unless somebody added it to replace a damaged trace. Either way, there there is a good chance that that is part of your problem, if not all.
As for it not being bolted on, that shouldn't matter as it is grounded through the harness. But you might as well find some nuts and secure it back in place.
No corrosion. Did you look very close around the two capacitors? Sometimes the leakage is really light and can be missed. If you see anything, green patina, light or dark brown stains, anything... on the board surrounding those caps, then you have leakage. Try to get some close-up pics and post them here.
To get the MAF unplugged, you need to remove the little retaining clip. A couple of small flat-head screwdrivers do the trick.
Here are your codes:
8. Air Flow Sensor
9. Water Temp Sensor
11. Coolant Temp Sensor
12. Throttle Position Sensor
14. Atmospheric Pressure Sensor
26. Purge Solenoid
I'm guessing the yellow wire was a repaired trace inside the ECM and the solder joint has come loose. It's unlikely that you have problems with all those sensors. Post some pictures of the caps and the yellow wire.