Modifications for the code to work on Windows.