Also this doesn't pass JSHint, mostly because of the various undefined or defined-but-not-used issues stemming from the lack of a closure + assigning to window.