Added handlebars templates. Made some slight improvements to JS.