Support duplicating, relabeling, removing root nodes

Change-Id: I5f40229c64bbce0699b7bc9fb5446b30d40cb771