Added API to directly access global vars.