Updated a bunch of functions and it should work on Windows