cleaned up the client api calls and the server side delete