WIP: checkpoint replication, and make a few changes so old code can be prebuild using old make
merge