Minor documentation comment fixes, and a fix to the gradient norm check.