Refactored build process on windows