JavaScript improvements

* Bundle certain main.js functions in single object literal
* Concat all .js files into a single, minified .js file