Rewrite parts of protocol for client usage