more window function cleanup