P1131
Front oxygen sensor circuit malfunction (short circuit)

P0133
Front Oxygen Sensor Circuit Slow Response

Well.. I think boths codes are trying to say the Front Oxygen sensor needs to be replaced.

As far as crappy idle goes... oxygen sensors can do this.
I can think of a few other things at this point if you have
not taken a look at them. Cracked or melted PCV Hose extensions, you can find these under the car.