Move JS dependencies into lib directory.
Replace underscore templating with handlebars.