Improved the word selection function so that it does not select parentheses, quote marks and some missing punctuations.