Ported app.js to coffeescript