Add Comparable implementations and store node ids.
Code convention conformation for great justice.