Fixed problems in the documentation and added notes.

See commits.