Implement more of the protocol, still not finished