Add implementation of register and deregister
Add functional test.  change terminate to stop.  Don't process
replicated messages from self.