further cleanup for storeOntologyInternal