Remove JavaScript variables from global namespace

As these variables were being assigned without being explicitly
declared, they were implicitly added to the global namespace.

This commit removes 59 variables from the global namespace.
Remove superfluous whitespace
Remove commented window.alerts
Remove commented code
Remove obvious comments, obviously
Remove commented hacks
Avoid use of Array/Object constructors

Array and Object constructors, as opposed to their literal values ('[]'
and '{}'), incur additional overhead and are less effectively optimized
by the compiler.