Added deep copy and fixed binary convert to not modify the original tree