Some optimization and other variants.