Well, pulling the same codes mine was pulling, the po171 and 174... ended up being my MAF Sensor. Have a look at it, clean it, and maybe get someone that knows what they are doing to test it. Mine was checked by the "Performance Specialist" at the local Ford dealer. And he knew what the hell he was doing! lol Anyways, he replaced my UIM and LIM gaskets and told me about the MAF ready weak, told me it might throw the codes again. Well, it did shortly after, and after replacing the MAF, it runs like a top! (aside from my ticking issues) Stumbled in the lower rpms, strong in the top end were the issues. I know its the 2.5 in mine, but just wanted to share that. If the MAF is reading incorrectly, telling the CPU its getting less air than it really is, it will starve the engine of fuel, and read lean....
Anyways, my 2 cents!