Move command list popup logic to CommandUtil