Improvements to unit tests.