Big fixes to the search, fetcher and main.