Refactoring done in windows.psm1 and Windows.Tests.ps1