Removed a number of direct accesses to the window structure.

15 files changed