Improved documentation and testing.