use handlebars for templating

add some sanity to the codegen