miscelaneous cleanup, fixes and such
a little closer on secondary windows