refactor flags: use /flag=value instead of single-character values