Copy tree

Replacement for #15