`getContactData` and `searchContactData` are nearly identical pieces of code. This should be abstracted into a single unit with the minor differences parameterized