necessary corrections

checkpoint correction to checkpoints.cpp also a few cosmetic changes