Reincorporate more non-WIN32 code