Add missing hashCode() implementations.
Use isLeaf() for TreeNode hashCode() calculation.
Add missing equals() implementations.
Add missing toString() implementations.
Add comments to the new model classes.