tidy up client