Convert existing JavaScript code to CoffeeScript