Random miss fire codes..

Hi I am new to the fourms hope I am asking in the correct spot. I recently picked up a 04 Corolla 1.8 so I keep getting p0300 and the codes that match all the cylinders now I am very mechanically inclined and have replaced the intake gasket and intake manifold.. and all the coil packs took throttle body off cleaned it. took off the idle air control valve cleaned it. Cleared codes and as soon as it fires up they show up on my scan tool and I have tried doing the fog test with no leaks found the car will start idle around 1100 then jump up too 2k then warm up and settle at 1200 and some times drops to 900 I am lost what am I missing any help much appreciated thanks