the replica subsystem is almost complete

(but still completely untested)