During the Middle Ages, tradesmen formed guilds for economic, social and religious purposes; there were often several trades in one guild. Originally, painters were in the same guild as physicians and apothecaries (pharmacists), in Florence, Italy. All painters had to join the guilds, unless they were in the personal service of a ruling prince. Only a Master could set up a studio in business, take pupils and employ journeymen. To become a Master, a painter had to submit a 'master-piece' to the guild as proof of competence. Guild officers supervised the number of apprentices, work conditions, and also materials (they bought in bulk, chose panels to work on). They had a trade union mentality, which centered on uniformity of performance; this led to painters like Michelangelo and da Vinci insisting on the freedom and originality of the artist, with the status of a professional and scholar/gentleman (an inspired being, rather than an honest tradesman). This new attitude toward artists led to the decline of the guilds, and the use of academies, which took over the teaching of art.