Fix bugs in replication replays and test. Fix other tests to work with new interface.