In February 1829 he moved to the newly completed St Stephen's Church in Stockbridge, Edinburgh, as its first minister.
[5] In 1838 he served as Moderator of the General Assembly of the Church of Scotland, succeeding Rev Matthew Gardiner.
[6] In 1845 he was made Dean of the Thistle Chapel and created Chaplain in Ordinary to Queen Victoria.
He retired in 1867 due to blindness and was succeeded at St Stephens by Rev Maxwell Nicholson.
The grave lies in the central southern section and is marked by a large pink granite obelisk.