Reduced objects in global scope, refactored config, misc changes to pass JSLint