Tree Delete's transform implementation and most of Tree Move's transform implementation