Move stuff out into a code_templates file