Some improvements to the trie: