Major code changes, naive replication should work (needs to be tested).