Improved and rewritten parts of the documentation.