make windows .exe, fix some windows file system oddities, general refactoring