Work on Tern and Trie