Added ConnectedComponents class