Migrate existing templates to Jinja templates