more refactoring/cleanup of the compiler class