First version that works on Windows (has probably broken some stuff on Linux, but I will check that in another commit).