Added add_word function to allow for addition of words to the corpus.
Fixed issue with word replacement and highlighting that replaced earlier
words instead of the current.