Refactors and compiling code