Rewrote some of the documentation.