Removes unnecessary copying