split up javascript some more, wrapped in closures as necessary and deferred all DOM bindings until after domReady. Otherwise, no code changes.