Separated search stuff into its own model.