Proper implementation of Object's equals, hashCode and toString for
TreeLikeStructure (+ some housekeeping).