clean-up client and server code