Adapt Firefox changes for Chrome

Firefox's main.js has no 'window' object. Move on to another notation.
Renamed global property 'app' to 'App'.