Refactored search block