Factorize optimization flags