Add docs and tests.