Implemented protocol

I implemented the protocol specified in the document, using all the data we will have.  There is no way yet to measure how full something is, thus those responses are not fully implemented.