Could be an exhaust leak, bad catalytic converter, or secondary o2 sensor. Most likely guesses anyway.
The car will run crappy after you reset codes because all of the ECU's learned values are reset, and it operates in a 1/2 timing advance mode until it knows things won't blow up. Totally normal.