Replies to the client now match syntax of commands to server.

Also added a registry so you can register handlers for replies.