Put mandatory items before optional ones