Added multiple minor changes for compiling on Windows) -UNFINISHED-