Added search client and refactor methods. Added ConditionalIteratorTests