Use ContextProxy everywhere

Fix use of `ContextProxy` to remove circular references.

See #14.