get_leaves returns vector
Simplified get_next_tasks for leaf scheduler
Avoiding duplicate work
Further simplification
Simplified get_leaves
Removed get_leaves for sets