A giant blob of window crap

Several things that should probably have been separate commits.