Refactor js with IIFE to avoid polluting global ns; tighten config

Changes:
1. Wrapping everything inside a function that is executed immediately keeps the vars from being global. Passing in window and window.document here are micro-optimisations for access speed (also good encapsulation, but not an issue here).
2. use strict stops some bad practices (scoped to this fn, to tread lightly).
3. converted console.log calls into equivalent code comments
4. turned off childList and characterData observation in config.