reverted bad changes to tests and tree

Reverted a pair of changes to the format tests and AVL tree. Added simpler
iteration functions for AVL tree.