Moving some of the global code into its own folder
Merge pull request #175 from rumblesan/shim-fixup

Globals fixup