Military use of castles rapidly decreased over subsequent years, although some were adapted for use by garrisons in Scotland and key border locations for many years to come, including during the Second World War. Other castles were used as county gaols, until parliamentary legislation in the 19th closed most of them down. For a period in the early 18th century, castles were shunned in favour of Palladian architecture, until they re-emerged as an important cultural and social feature of England, Wales and Scotland and were frequently "improved" during the 18th and 19th centuries. Such renovations raised concerns over their protection so that today castles across the British Isles are safeguarded by legislation. Primarily used as tourist attractions, castles form a key part of the national heritage industry. Historians and archaeologists continue to develop our understanding of British castles, while vigorous academic debates in recent years have questioned the interpretation of physical and documentary material surrounding their original construction and use.