Tuning tree depth and impurity