Compiler refactor