take of the manifold and above the crankcase braether it will say 1.6 1.8 2.0 this is the block size
as for the dodgy idle etc
1 did the car idle funny when u changed the throttle body or when u added the maf
both send out a 0-5v signal sounds like 1 of them is hitting 5 v before its ment to
but need bit more info on this 1 mate