Add some comments explaining the connected components algorithm