internal refactoring of compiler