18th century governors tried to tackle the island's problems by implementing tree plantation, improving fortifications, eliminating corruption, building a hospital, tackling the neglect of crops and livestock, controlling the consumption of alcohol and introducing legal reforms. From about 1770, the island enjoyed a lengthy period of prosperity. Captain James Cook visited the island in 1775 on the final leg of his second circumnavigation of the world. St. James' Church was erected in Jamestown in 1774 and in 1791–92 Plantation House was built, and has since been the official residence of the Governor.