initial refactor to remove table trie from branch