Now compiles and runs on windows (MinGW)