In 1775, George Gray was elected rector of the Cupar grammar school, vested with the power to appoint and dismiss his assistants at will. In November 1777, Gray dismissed John Jesson, second doctor of the school. According to Jesson the town council was widely displeased with Gray's conduct and indeed, around this time a "lawless mob" descended upon Gray's residence and broke his windows. Nevertheless, Gray petitioned the Sheriff of Fife to compel Jesson to leave his post. The Sheriff cited Jesson to appear, and Jesson then submitted his case to the Court. Lord Gardenstone passed the bill, and after Gray produced letters from members of the town council assenting to the dismissal, Lord Monboddo found that Jesson was properly dismissed. Jesson petitioned the Court for review. His advocate, William Craig, wrote that if any master knew before taking up a position that he would be “subjected to the arbitrary and capricious will of the head-master, no person of spirit would undertake the office. Such as did undertake it, would be put into a slavish and dependent situation, incompatible with that liberality of mind so essential in the teachers of youth.” The Court refused Jesson's petition.
Mungo Brown, Supplement to the Dictionary of the Decisions of the Court of Session (1826), pg. 600