Get rid of the allWindows field, everything can now remain local to one function.