Clean up check_cmd_context stuff. Fix core documentation for a few directives. Reviewed by: Jim Jagielski, Ken Coar, Martin Kraemer