Trie improvements