Fixed history handling, patching
Cleanup; fixes to history & loading
Cleanup