Stripping out any duplicate words from the buffer.