Trinity House of Leith

Trinity House, 99 Kirkgate, is a building in Leith, Edinburgh, Scotland, which was a guild hall, customs house, and centre for maritime administration and poor relief. In the Late Middle Ages and Early Modern Era it also served as an almshouse and hospital. Now in state care, it houses a maritime museum. It is a category A listed building.
History.
Masters and Mariners of Leith.
In 1380 King Robert II granted the Incorporation of Master and Mariners of Leith the right to levy a duty, called prime gilt, of 12 pennies on each ton of goods landed at Leith. An additional voluntary contribution, called crown money, was also collected. Trade was largely conducted over the North Sea, with the Nordic and Baltic regions, the Low Countries and France. The funds raised by the prime gilt and crown money were then used for the relief of the sick, the poor and the widows and orphans of lost or captured mariners; and to care for aged mariners. The Masters and Mariners of the Trinity House in the Kirkgate was the oldest and became the wealthiest of the trade guilds of Leith.
Following a series of disputes over payments, in 1566 Mary Queen of Scots confirmed the right of the Incorporation to collect payments: ratifying "the gift, foundation, erection and institution of the hospital and of the prime gilt". Refusal to pay would result in the confiscation of sails and anchor. 
The medieval Incorporation served as a blueprint for the establishment of Trinity Houses in other maritime centres, including Newcastle-upon-Tyne in the 16th century.
In 1680, funded by fees and by a levy on Leith shipmasters, the Masters and Mariners appointed a professor to teach the mathematics of navigation to the sons and apprentices of shipmasters.
Concerned to improve safety at sea, Trinity House established the first formal nautical training in the country and licensed pilots for the Forth and around the Scottish coast. By collecting Licht Money (light money), by the 17th century they were maintaining primitive coal-fired lights in the Forth. In the 19th century, Trinity House was involved in the planning and funding of new and more reliable lighthouses that took advantage of improvements in technology. These included the Bell Rock lighthouse, Fidra lighthouse and the Isle of May lighthouse.
On 29 June 1797 the Corporation of the Trinity House of Leith was granted a royal charter. 
In the 18th century, The Masters and Mariners invested in land, which became known as Trinity Mains, near the village of Newhaven. This land later developed into a suburb of Leith and into the district of Trinity.
As a result of the requirement for formal qualifications stipulated in the Merchant Seamen Act 1844, in 1855 Trinity House and other Leith organisations founded the Leith Navigational School (also called the Government Navigation School), based at a room at St Ninian's Church (also called the Mariners' Church), on Commercial Street. In 1903 Leith Navigation School came under the control of the Scottish Education Department, and the name was changed to Leith Nautical College (since merged to become part of Jewel & Esk College, which in 2012 merged to become Edinburgh College). 
After prime gilt was abolished in 1862, Trinity House had to depend on property income to meet its pension payments and other commitments.
Pupils from the nearby Leith Primary School are taught about the history of Trinity House and offer scripted tours of the building to other schools and a variety of selected guests. 
History of the building.
In 1555 the Incorporation had sufficient funds to build a hospital at the Kirkgate. The basement and vaults of the 16th century building were incorporated into the current building, which was designed by Thomas Brown in the neoclassical style and completed in 1818. The new building had three bays on the front elevation and featured a porch with paired Doric order columns on the ground floor; there was a large window with Ionic order columns and semi-circular fanlight window above on the first floor.