added a GlobalContextManager + a few tests