Refactor client mess to an object.
Don't delete all channels. That's a bit harsh.