Implemented copy functionality.