Generic search algorithm
connected components
Merge branch 'generic'