Fix connectivity functions, do not export bfs