Rewrite of the insert() and delete() methods of the AVL tree.