Fix up protocol implementation a bit. Not ready yet.