Add tests for #53.
Improve documentation.