added trie
added method to print out trie sorted by count
cleaned up some code