Here's a fully functional AVL Tree implementation