Fixed service search function, garbage cleaned

Change-Id: Iec6b3c56d464d26e4f1fc143e6a7804add67a35d