Started working on some kind of structure of the protocol code.