Revert "Code review"

This reverts commit 579907a8790bce5d5f06b36f1b4ff903c7d7c4fd.
Revert "Code review"

This reverts commit 08ec78f175de648d8be1e3b2ea3cddc82a7857cd.
Revert "Code review"

This reverts commit 2292afcedb6715783499d0a6c4473ebae678643d.
Removed distance_on_the_tree