cleaning up coffeescript conversion