Refactor calculation for reverse path tree.