Move catSearch code to Category->getCategorySearch and remove duplication