implemented delete client.
fixed some bugs.