Refactor Search