I'm glad to hear your engine is running smoothly!
As for the codes, you're still getting the P0171 and P0174? If the battery goes back to 2006, then yeah, you may as well replace it as it will be money well spent anyway. I'd also suggest you carefully check all the intake air tubing and vacuum lines that would have been touched during the PCV elbow repair, including the one for the baro sensor on the back of the upper intake.
Good luck!
-Rod