Rework hierarchy editor code to be (1) cleaner, (2) more efficient