ContextState improvements