use basis.template.define and move templates to separate files