Okay so the story goes my 240 has been through a transmission swap, and much more recently has had a new ka24de dropped in. That being said the idle is very weird. When start from cold it revs up in the 2000's

and sits there for a while. Once warm this is where it gets even better. It will sit at 1500 then drop randomly to 500, and have trouble keeping idle only to jump back up to 1500.

I have replaced tps, iacv, aac, coolant temp sensor, and am now considering replacing the MAF. Any thoughts or opinions on it. On another note I thought that I had it fixed yesterday because without moving the car just tuning it sitting still the car finally got to sit at 800 rpm, but when I took for a drive I got about a mile down the road hit the clutch and it rested rpm at 3000!?!?!?

I also deleted the emissions and I don't think that I have any vacuum leaks that I can find. I haven't taken out the carbon canister yet though. Also it seems that the exhaust smells of a lil gas and is putting out a lil white smoke. Which again smells like gas. I had the same problem on old engine after I swapped injectors and gas got into the exhaust making a big white cloud of smoke until I drove it and burned out extra gas in piping. Thoughts?