Remove the EGR valve. Using compressed air, blow out all the black carbon. Use a solvent cleaner and small brush for large carbon deposits. Check for operation. The air idle valve is on the throttle body. It is held by two small screws. Remove it and clean the rubber end. It may be distorted or ruptured. Check for operation. It will set itself after you start it up. There is a procedure to set it too. Check with
www.autozone.com. The fix it your self area had factory directions, pictures and diagrams.