 Complete the following phrase:  In 1505, the partially ruined castle was granted to Alexander Gordon, 3rd Earl of Huntly, who was charged by King James IV with repairing the castle for use as a Royal garrison. His brother William Gordon, Laird of Gight, became master of Inverlochy, and was slain commanding the Camerons at Flodden. In 1645, the castle served as a stopping-off point for the royalist army of James Graham, 1st Marquess of Montrose during his 