[WIP] Add avl tests

This pull request adds and fixes the avl tests
Ah! Thanks, that does indeed explain it.