Move ontology_type factory to spec directory.