Handle more flags.
Various changes.