Windows refactoring