optimize unique, fix pipes doing transforms on write.