Fixed some issue with search PIM/MAM And refactor code
Merge branch 'sprint7' of https://github.com/amarpotghan/cs into sprint7