Remove spaces at the beginning and end of a sentence. It also replaces N consecutive spaces with a single one.