Just a quick trie implementation for a good night's sleep