Cleanup history initialization.