for your other code, here is the diagnosis. if you dont know what it means by VREF at the TP sensor, it means check your 5v reference circuit for your engine control potentiometer/piezoelectrics
You do this at the TP because its easiest to check at between all engines