WIP: Added opengl modelview matrices, fixed bug in code.generate.