Added docs and tests.