JohnG. Pass in window, doc, etc. to main.js