Add constructors, and other improvements to code generation.