Compatible win32 code

Removed all thread stuff to test working win32 implementation