Further changes to protocol and debugging