Updated js to use handlebars.js and js templates