Fix unlink not working because of a reference to a Qt object that has probably already been deleted...
More incremental work to the new history module...