Updated as.tree to reflect different classification/regression outputs