cleaning up the search for category, and minor cleanup of unit test output