Implementation of an AVL tree