Implementing simple Handlebars template engine