Merged Windows changes into Bruno's new version.