Moving to JavaScript from CoffeeScript