Better handling of cmdline flags