Templating and Coffeescript improvements