I can move much of the window fitting to the impure code