wip - refactored simple trie class for readability