Globals fixup

Moving some of the global bits into their own sub folder to try and make it clearer what they do.