Factorize flags.