Rebuild using Jinja2 templating, closes #33, closes #41, closes #42