Avoid most references to the internals of the WND structure by passing