ENG-6197: Checkpoint. Some new functionality, bugfixes and code cleanup.
I think it 100% works now. Needs a bit more polish.