transformed Aberdeen into a property-owning and financially independent community. Granted with it was the nearby Forest of Stocket, whose income formed the basis for the city's Common Good Fund which still benefits Aberdonians. During the Wars of Scottish Independence, Aberdeen was under English rule, so Robert the Bruce laid siege to Aberdeen Castle before destroying it in 1308, followed by executing the English garrison. The city was burned by Edward III of England in 1336, but was rebuilt and extended. The city was strongly fortified to prevent attacks by neighbouring lords, but the gates were removed by 1770. Aberdeen's medieval council registers survive from 1398 onwards and are exceptional for their quantity and continuity among surviving Scottish burgh records. The earliest eight volumes, from 1398 to 1511, have been included in the UNESCO UK Memory of the World Register, and have been edited in a digital edition. During the Wars of the Three Kingdoms of 1644 to 1647 the city was plundered by both sides. In 1644, it was taken and ransacked by Royalist troops after the Battle of Aberdeen and two years later it was stormed by a Royalist force under the command of the George Gordon, 2nd Marquis of Huntly. In 1647 an outbreak of bubonic plague killed a quarter of the population. In the 18th century, a new Town Hall was built and the first social services appeared with the Aberdeen Infirmary at Woolmanhill in 1739 and the Aberdeen Lunatic Asylum in 1800. The expensive infrastructure works led to the city becoming bankrupt in 1817 during the Post-Napoleonic depression, an economic downturn immediately after the Napoleonic Wars; but the city's prosperity later recovered. The increasing economic importance of Aberdeen and the development of the shipbuilding and fishing industries led to the construction of the present harbour including Victoria Dock and the South Breakwater, and the extension of the North Pier. Gas street lighting arrived in 1824 and an enhanced water supply appeared in 1830 when water was pumped from the Dee to a reservoir in Union Place. An underground sewer system replaced open sewers in 1865. The city was incorporated in 1891. Although Old Aberdeen has a separate history and still holds its ancient charter, it was annexed by the City of Aberdeen in 1891. Over the course of the Second World War Aberdeen was attacked 32 times by the German Luftwaffe. One of the most devastating