A version that eliminates the unnecessary windows I was creating before, and the accompanying errors about no longer being able to communicate with the browser windows.