Refactoring DeleteCommand and UpdateCommand.