Major simplification of checkpoint code.