cmdutils: remove sws_opts usage, simplify code