Refactoring Coffeescript