Added trie implementation.