Refactored OntologyExtractor + handling exceptions