restructure app.coffee a bit, more related stuffs stay together