Add checkpointing
Merge pull request #7 from martinghunt/checkpointing

Add checkpointing