AVL Tree Template Code in C++