Added docstrings. Fixes #2.
Added UML diagram. Fixes #7.