Slightly changed tree api.