PLA-1549

Wrap global state and end the misery (pun intended) of categorymembers
core api.
whats up with this global variable name?