Refactor coffeescript.