Just some code reduce.
ReplaceDocumentCommand and some refacs to CopyDocumentCommand.