Adding 3 utility functins to deal with replication
Merge branch 'master' into replication