Added functionality to deal with beginning of sentence capitalization and end of sentence punctuation.