First search version working, a lot to improve