Lots of refactoring for windows and glass.