jst support and coffeescript refactor