Adding docs for context and improving context checking.