Trinity College and Hospital was founded by Mary of Gueldres (wife of James II) in the mid-fifteenth century. It functioned both as a community of priests and a shelter for the poor and sick of Edinburgh. The church was meant to be a large Gothic building, but only the choir and transepts were ever completed. The famous Trinity altarpiece by Hugo van der Goes is probably from this church. The Hospital survived the Reformation, but was demolished in the nineteenth century to make way for Waverley Station. Fragments of the church building were reconstructed on a new site as Trinity Apse.