Initial implementation of checkpoint state

Still need to complete tests