Expanded and reworked documentation.