Cleanup deallocate and begin in the history tables