Move operations on trees to a separate module