basic structure

brought in template https://github.com/martinleopold/TemplateMode and
made minor modifications