Updated the source to work on Windows platforms.