started refactor of js with handlebars