Add copy/duplicate function to Tree