remove broken commands, refine existing