more cleanup of search box handling, also started a clean implementation of the search box