Basic utilites for tree splitting