variables renamed across modules to improve readability [ci skip]
debugging the main tree-mining fn [ci skip]