Added TemplateEngine, ported Vanilla interface