Removed the global variables that were not needed to be global and placed them...
Removed the global variables that were not needed to be global and placed them in a struct. All the other global variables that were mutable before were protected with std::mutex (lock)
Closes ATLASRECTS-5209
Edited by Tadej Novak