clean up pull replication code (make sure replications are retained and also make it easier to stop/start in future if desired)