Server modification, client model change

Modified the server mostly with some debug code and corrections.

Overhauled the client model to work with zproto.