replace a lot of templating with handlebars