Macro out legacy thread code (does not build on Mac)
Macro out some legacy util code, not needed yet