Change Javascript to CoffeeScript