-made JSHint friendly
-missing semicolons and === comparator
-passed in window, document and undefined for added safety