Improvements to unit tests, documentation comments.