Added code to test ConnectedComponents