First stage of window/pane cleanup