Code cleanup of search and presentation