Using handlebars to clean this up a bit