Start refactoring to coffeescript