more cleanup to make taskTree testable