Changed templates to jinja2.

https://gist.github.com/przemekmazurek/5c49dfc265aa7d5d0a86