Windows refactor