Added generic search and more business logic