WIP fix mflag crash
WIP: cleanup opts parsing in main