Coffeescript conversion