Add flatten and remove-consecutive-duplicates