Refactor windows.