Checkpoint refacotring