Elaborated search
Remove debug prints