of the Duchess. The majority of construction was complete by 1711. Finishing touches on the palace complex included adding a wrought iron screen with freestone piers (no longer existing) around the forecourt, a great deal of planting, and the laying out of a great avenue through the park. Dalkeith Park itself was a large area of manicured trees and gardens which in later years would include the Montagu Bridge over the North Esk River and the Dalkeith Conservatory and a grassed amphitheatre. When the final calculations were made, it was determined that the construction of Dalkeith Palace had cost the Duchess a total of £stg.17,727. The plumber John Scott of Edinburgh re-plated the roof in lead in 1743. Some minor additions were carried out in the following years. John Adam resurfaced the building in 1762 and James Playfair inserted a low window into the east facade in 1786. Overall, the palace is built of sandstone and has the main entrance on the south front, flanked on each side by two Corinthian order pilasters. These are surmounted by a bracketed pediment unusual for its depth. The layout of Dalkeith Palace was unusual for the time in that the state apartment was located on the ground floor, which prevented the Great Dining Room from being placed in its customary position at the start of the state apartment. As such, the Great Dining Room was placed on the first floor, still suitable for important occasions and also serving as an anteroom to another apartment on the first floor. 18th and 19th centuries The 5th Duke of Buccleuch considered extensive rebuilding in 1831 and William Burn produced unexecuted designs in Jacobean style. More minor alterations were carried out, together with improvements to the surrounding estate including a new house and offices for the Duke's Chamberlain, and the construction, for the 5th Duke, of St Mary's Church as a private chapel by William Burn and David Bryce. The church contains one of only two water-powered organs in Scotland. Several well-known figures from English and Scottish history have been guests at the palace in the intervening centuries. Bonnie Prince Charlie stayed two nights at Dalkeith in 1745, King George IV slept here during his visit to Edinburgh in 1822, in preference to the Palace of Holyroodhouse which was in a poor state, as did Queen Victoria in 1842. Dalkeith Palace was also visited by Edward VII