Changes to add remove replicate handling