Broke up `treeprof` into sub functions to facilitate testing