Although few buildings remain from this period there are records of works in 1617, 1618, and 1628-9. A replacement Wallace Tower was built superseding the medieval building. In June 1618 masons were working on the upper storey and it was decided to make the tower larger. Externally it was finished with lime plaster called harling. At the south side there was a bell house. By 1627 it was discovered that the keeper Sir John Stewart of Methven had neglected the fortress. He was replaced by Sir John Stewart of Traquair who recorded the poor state of the building. Surviving accounts mostly record work on the artillery and the 'foir yet wall' a defence on the southern side. The Scottish Parliament in 1644 judged that the castle was likely to more hurtful than useful to the country. In November 1645 the Committee of Estates approved the recruitment of thirty extra soldiers by the keeper John Semple to guard the increased number of prisoners. The castle's strategic importance declined after Oliver Cromwell's death in 1658. However, due to threats posed by Jacobites and the French in the eighteenth century, new structures and defences were built and the castle was garrisoned until World War II. Some documentation for these later works is preserved in the National Archives of Scotland.

Question: Who was the keeper of the fortress prior to Sir John Stewart of Traquair?
Answer: Sir John Stewart of Methven

Question: Which happened later, the the Committee of Estates approving the recruitment of thirty extra soldiers or Oliver Cromwell's death?
Answer: Oliver Cromwell's death

Question: How many times was work recorded as being done on the building?
Answer: 3

Question: What happened later, the work on the upper storey, or the recruitment of thirty extra soldiers?
Answer: recruitment of thirty extra soldiers

Question: How many years after the appointment of John Stewart of Traquair as keeper did the Scottish Parliament judge the castle as likely to be more hurtful than useful to the country?
Answer: 17

Question: How many years after the recruitment of 30 extra soldiers by John Semple did Oliver Cromwell die?
Answer: 13

Question: How many periods of works are in the records for the medieval building?
Answer: 3

Question: How many years after the Scottish Parliament judged that the castle was likely to be more hurtful than useful to the country, did Oliver Cromwell die?
Answer: 14

Question: How many years are there records of works in?
Answer: 3

Question: How many years after the masons working on the upper storey was it discovered that the keeper had neglected the fortress?
Answer: 9

Question: Who was the second keeper?
Answer: Sir John Stewart of Traquair

Question: Where were the two Sir John Stewarts from?
Answer: Methven