Minor refactoring

Added strict mode, renamed doc to document, added some comments
Minor comment
Minor comments
Simplified code

Deprecated IIFE and just use a plain function. Cleaned up some of the
internal code and functions that were largely a remnant of an older
deprecated approach. Cleaned up some comments. Inlined some functions
that are only called once and that do not significantly detract from
readability.
Added a few blacklist selectors
Minor comment change