Simplify the dereplication function

Use "<<<" to avoid an echo and a pipe.