St Machar's Cathedral was built twenty years after David I (1124–1153) transferred the pre-Reformation Diocese from Mortlach in Banffshire to Old Aberdeen in 1137. With the exception of the episcopate of William Elphinstone (1484–1511), building progressed slowly. Gavin Dunbar, who followed him in 1518, completed the structure by adding the two western spires and the southern transept. It is now a congregation of the Church of Scotland. Aberdeen has two other cathedrals: St. Mary's Cathedral is a Roman Catholic cathedral in Gothic style, erected in 1859. In addition, St. Andrew's Cathedral serves the Scottish Episcopal Church. It was constructed in 1817 as Archibald Simpson's first commission and contains a memorial to the consecration of the first bishop of the Episcopal Church in the United States of America, which took place nearby. In 1804, St Peter's Church, the first permanent Roman Catholic church in the city after the Reformation was built.