made changes to generate and script windows, simplifying their
constructors.