sentences:  At some point before his death in 1794, Hugh Hume-Campbell, 3rd Earl of Marchmont, 3rd Lord Polwarth, restored the castle as a folly, from the waste left from its destruction, on the original foundations of its curtain wall.He adorned the wall tops with enormous crenellations that are more picturesque than practical.In light of its function as a mediæval early warning system, the castle was used again as a beacon during the Napoleonic Wars.