Server rewrite appears mostly complete. Client is currently replaced by server code: to be modified to represent client in next iteration.