Various Windows Cleanup

Would be great if you could keep the commits separated when merging into master.