cleaned up a bit to seperate registry creation and replication