Final refactoring of PatternDesc.