fixes to search and some minor changes