Move app module creation from main.js to app.js

Don't merge ! 

This does not work in `?debug` mode: `main.js` is loaded before `app.js`: the module is used before created