Refactor search components