Create ns for reduce functionality
Add leaf? function back to make some calls more natural