clean up of class ConnectedComponents