Add documentation and tests
Improve test coverage

... to 99%