Sounds like u got a lot of new internal parts. Perhaps the idle problem is,
head gasket or a seal is causing a vacuum leak . If a new one was installed and not done right, or its cheap or made slightly wrong it could leak , also heads can warp causing leaking. If the gasket isn't already...