Rework suffix trie implementation.