Refactor content search