Fix syntax errors in documentation.

Also, I removed a couple of trailing whitespaces.