Remove imd.cpp from the mac build.
Clean up some of the mac scripts.
Whitespace fixes.