MOD:  refactor Context.
MOD: add some comments.