Added a test.  Improved documentation.