moved all JS to CoffeeScript