converted browser-main.js to be app.coffee instead