further split up compiler.cpp