Until the late medieval period most schools were controlled by the church and had specific entrance criteria; others were restricted to the sons of members of guilds, trades or livery companies. The need for professional trades in an increasingly secularized society required schools for the sons of the gentry that were independent from ecclesiastical authority and open to all. From the 16th century onward, boys' boarding schools were founded or endowed for public use.[5] Traditionally, most of these public schools were all boys and full boarding.