Checkpointing code cleanup.