WIP - replication rewrite

the idea is to make a more straight forward pipeline like discussed in #1954