Move init() method in TemplateEngine class