Improve documentation and simplify a unit test