Finish translating JavaScript to CoffeeScript