switching from static templates to jinja2 templates

https://gist.github.com/marek-leszczynski/098d54f66088d6053f2b