tidy up and remove client