Removed a number of direct accesses to the WND structure, replacing