Refactor animalType search