updated protocol doc. need to update code to match
some more tidy up of protocol.md