Minor cleanups ready for Windows thread additions

See title