Code cleanup.
Attempt to fix the -windowDidChangeScreen: crash by cleaning up delegates as much as possible.