Refactor Search module.