some cleanup
Adding support for new windows creation.