Adapted for the use of the HistoryZap plugin