Remove unused dup function