Compiler code cleanup plus a few more small optimizations to compilation times