Originally posted by E34EuroTouring@Oct 6 2005, 10:22 PM
Did you have spark plugs changed recently too ?. Or recently checked, if one or two plugs are foul, it will cause irratic idle too.
But I really think, your AFM may be very dirty or may need "internal" conditioning. First try to clean it with Carb Cleaner and also the intake elbow. Since your ICV is new, did you change some of your hoses as well. I found that small hoses to ICV can be filled with oil and needs to be replaced. These hoses are rather cheap from the dealer.
The other thing is to check for vacumn leaks. The vacumn hose from the FPR to the intake manifold can easily come lose or the previous owner might have just removed it!. There is also vacumn hoses out of the brake booster (driver side of engine compartment that had small hoses (less than 1/2 inch diameter). If these or the small check-valves are broken, replace them as well.
I would not recommend opening up the AFM if you do NOT have a spare. If you break it, the car would not start or would hardly run at all!. Too dangerous, just clean it well with Carb cleaner and clean rag. Put them all back and it could improve the idle significantly.
Good Luck.