Rearrange globals for proper thread management stuff
I guess the file changes format?