More docstrings and unit tests added.