Added deletion for old data, fixed rpc to close clients which should have really been done earlier, fixed CLI case problems