Moved trie to public dir.
Renamed terminal_input_trie to just trie.
Trie now params on key sequence and value types.