The CLASS statements separates the analysis by Flavor and Layers. ORDER=FREQ and ASCENDING order the levels of Flavor by ascending frequency. MISSING uses missing values of Layers as a valid class level value.
   class flavor /order=freq ascending;
   class layers /missing;