Added draft for threads tests
Added forkGlobals function