Combined model search functions into one.