#7 Almost complete rewrite of search control