Some refactoring (especially of the OntologySearch class).