Initial working version of the new search. Still a lot to do