Renamed DistToRoot to GetDistToRoot and made it pure virtual.