Finished porting to Windows