The system of schools which prevailed till the Education Act of 1872 dated from 1696, when the Act for Settling of Schools was passed - one of the last but not the least of the achievements of the Scots Parliament - providing for the maintenance of a school in every parish by the kirk-session and heritors, with power to the Commissioners of Supply to appoint a schoolmaster in case the primary authorities made default.
Latterly five of the bays at the west end had been utilized as the parish church, but in 1873-1875 the 9th marquess of Lothian built a church for the service of the parish, and presented it to the heritors in exchange for the ruined abbey in order to prevent the latter from being injured by modern additions and alterations.
This act, which applied to the disjunction and erection of parishes, introduced a simpler form of procedure, and to some extent dispensed with the consent of the heritors, which had been required under the earlier statute.
The oldest governing authority was the meeting of the heritors or landowners of the parish.
Though gradually shorn of much of its old importance, the heritors' meeting retained the power of imposing an assessment for the purpose of providing and maintaining a church and church - yard and a manse and glebe for the minister.