[Evgeny, Jason] minor fixes to insertAtTreeIndex; Command with no function