Refactor checkpoint.
More refactoring.
Checkpoint.