Made search more general.