Just about finished the code generator