Fixes build on windows and makes it simpler.