Compile and refactor