Rewriting in coffeescript
Genereated JS
Manual tests for now. Qunit or Karma in the future