Issue #8209 by cableman: Moved search logic into own object