Refactor zones command

Who owns what code? This still needs to be disentangled,
but maybe this is a bit better.