add cached functino for ontology module, along with some other modifications