Trie supports "Contains"

massive cleanup
fixed hash table