cleaning up the history mapper