Rewrite to coffeescript.