Refactor that coffeescript