Adds logic to Handlebars templates