cleanup cfg for ontology