Refactoring of the model. The goal is to clearly separate the core
classes used in the client and the server from the wire protocol classes
and to hopefully provide a better encapsulation.