Handlebars refactor