Rewrite client.h and documentation.