tidying up some of the template partials and JSON. Also converted coffeescript back to plain js