Changing to jinja templates