Moved unix and win32 code to different files