Changed dictionary to use a hash set as strings are relatively expensive to compare for a word lookup