Switch to jinja2 for templates, now things make sense