Adds deep copying to objects.