Updated the schema registry to be an event emitter and added various methods.