Added code to prevent the same quote from appearing more than once in a row.