Improved test and documentation.