Replaced timing belt and reman. head. Runs fine till it warms up, then it idles lousy, surges from 1,000rpm down to 700 or 800rpm, sometimes after reving the engine it will rev to 2,000rpm by itself. Sometimes stalls. Acts irratic. Replaced the O2 sensor, injectors and fuel rail- same problem. Comes up with P0170 fuel trim code and also a code for rpm higher than expected. Any ideas without throwing more parts at it?