Added documentation.
Updated test.