The main administrative divisions of mediaeval Wales were the cantrefs, each of which was divided into several commotes. These were of particular importance in the administration of the law. Each cantref had its own court, which was an assembly of the ""uchelwyr"", the main landowners of the cantref. This would be presided over by the king if he happened to be present in the cantref, or if he was not present by his representative. Apart from the judges there would be a clerk, an usher and sometimes two professional pleaders. The cantref court dealt with crimes, the determination of boundaries and matters concerning inheritance. The commote court later took over most of the functions of the cantref court. The judges (Welsh "ynad") in Gwynedd were professionals, while in south Wales the professional judges worked together with the free landowners of the district, all of whom were entitled to act as judges.