re-write of app.coffee >> simplification