initial step to combine replication and messaging logic
in the end…. it is the same action
Second step, actually use shared code
cleaning up code
Fixed some issues, a NPE….