Fixed a minor bug and improved documentation.