Reimplemented trie with data only at leaves