Moved from serverside js to coffeescript