Moved window constructors into init().