Move *Context classes from being static/inner classes to fix delegation issues.