Initial bit of code rewriting and compilation functionality.