Add ConnectedComponents class