CoffeeScript code refactored.