Ported global getting/setting functionality.