Working on SEARCH functionality. Code cleanup.