Refactored search function by county into Court model