Popular conceptions of the third and final phase of the Hundred Years War are often dominated by the exploits of Joan of Arc, but French resurgence was rooted in multiple factors. A major step was taken by King Charles VII, who created the "Compagnies d'ordonnance"—cavalry units with 20 companies of 600 men each—and launched the first standing army for a dynastic state in the Western world. The "Compagnies" gave the French a considerable edge in professionalism and discipline, being composed of paid full-time professional soldiers, at a time when the allegiances of the aristocratic knights would often shift to the opposing side. Strong French counterattacks turned the tide of the war. The important victories of Orléans, Patay, Formigny and Castillon allowed the French to win back all English continental territories, except Calais, which was later captured by the French.