Add search function and refactor collection add/ remove event.