Moved search into its own action and adjusted query for speed