Move search into a class in preparation for adding functionality