add client code, clean up docs