Lean codes and no power
I have a 2000 F150 5.4 that I recently purchased and it is giving me all kinds of issues. It had a misfire in cylinder 4 when I bought it. Changed out all coils and plugs on all cylinders. Misfire was still there. Ordered an injector and replaced it along with all the intake gaskets and vacuum lines. I checked the spray patterns of all the injectors including the new one and they all are spraying normal. Put EGR valve in as I kept getting EGR codes as well as Oxygen sensor codes. Replaced both upstream oxygen sensors as they were not reading on the scan tool before but now both are. I checked fuel pressure and found it to be at constant 32psi regardless of idle or trying to accelerate hard. The problem I am running into is no power. I put my foot down and RPMs go up and the truck barely wants to accelerate. I get up to cruising speeds and it does't have enough power to maintain the speed without downshifting. Currently, I have 2 codes P0171 which I have had a code for from the start, and code P0155. Checked the catalyst as well to see if they were clogged and they seem to be fine. I did drive it without the exhaust connected just to verify and the truck runs the same. Not sure if it could be the engine module or what, I am just at a loss at this point. Any help at this point would be appreciated.

