Remove the replication feature and clean up the code.