Fixed a bug with trie and began cleanup of test