Add checking of classes that are connected.
Add javadoc for myArrayList.