Updated codegen.cpp, added codegen.h