ontology cleanup, with updated unit tests