Refactor and add test for bt-reverse
Added traversal functions and tests