more complete code generation

also getting ready for better syntax highlighting