2010 HHR LT 2.2 has had funny idle with occasional stalling. Had oil changed last Sunday and noticed the air intake hose connecting fender to filter box was unraveling so my Daddy took it off and i drove it like that. 3 days later on Wednesday my car wouldn't start and had an insane rattle for a few seconds when it finally started. My Daddy said it was the starter. Later that day it started to stall again while i was on my mail route and i couldn't let it die cause i hadn't got the starter fixed yet so i quit my route amd went straight to my daddy so he could put a starter on it. When I left my daddy's the CEL was on. The next day on my way to work it was driving fine (10 min drive to work) I stopped at Advance Auto along the way to have them scan it and its throwing codes P0171 and P0326. The car continued to drive fine until I was about an hour into my route then it started having lack of power on take off every time I stopped and started to stall once but it didn't. So quit my route again and went straight to my daddy's. He seemed think it was my fuel pump but fuel PSI is 60. He put a new intake hose it where it was left off a few days before. I'm not sure if the intake hose being left off could be the issue or not, haven't drove since.