cleaned up TrieNode, probably less buggy