AVL tree implemented with reasonable invariant checking. Works ok so far.