Refactor method search classes for better reusability