Code cleanup
Performance improvement while populating a tree