reorganized imports
with_digits replacement breaks on 'PERSONALITY', use [A-Z]
word_dict has unique version for faster word comparisons