Switched from list to set for tree nodes