Wrapped all globals in an app object.
Added a minified version compiled with Google Closure Compiler.