clean up ClientAPI