Fleshed out the CodeGenerator