Add mode for presenting documentation.

Update doc mode.

Update doc mode comments, clean up code.