basic client and server cleanup