Added Windows compatibility
Fixed errors in Windows