you'll always get the AC code if you don't have AC. Lean condition, new O2 sensor= cracked exhaust manifold or loose exhaust manifold bolts or air getting into the exhaust manifold through the head to manifold gasket (if it has one). The crack doesn't have to be big or make any noise, if there's a crack air will get in and the O2 sensor will read lean all the time. That's why the light is coming on, it doesn't come on for AC or battery disconnect.