Avl tree upgrade.
General updates.