Moved app.coffee to lib.