code cleanups and kill Client.stop