Nearly factored out a persistent looping master->slave replicator function