(tries)refactor, removes unused test-avl.

There were some unecessary word.slice and at some places return-if-fails was not being used. Adding this reduces size and raises readability.