the ceding of Hong Kong Island to the British and opened the treaty ports of Shanghai, Ningbo ("Ningpo"), Xiamen ("Amoy"), and Fuzhou ("Fuchow"). It nominally opened the walled city of Guangzhou to the foreigners, but this was subsequently resisted by the city's viceroys on a number of pretexts. The factories were rebuilt at their former location but, with their diminished importance, they were not rebuilt a third time after their destruction at the onset of the Second Opium War. Instead, the foreign traders first operated off of Henan Island on the other side of the Pearl River and then, after the war's conclusion, rebuilt their Guangzhou operations at a new enclave on the Shamian sandbar south of the city's western suburbs. Organization Under the Canton System, between 1757 and 1842, Western merchants in China were restricted to live and conduct their business only in the approved area of the port of Guangzhou and only through government-approved merchant houses. Their factories formed a tight-knit community, which the historian Jacques Downs called a "golden ghetto" because it was both isolated and lucrative. These hongs—first established by Pan Zhencheng () and nine others in 1760—were granted a lucrative monopoly on foreign trade in exchange for various payments and obligations to the Qing state. The hongs were organised into a guild known as the cohong, which also oversaw the Thai and domestic trade in the South China Sea. The Hoppo was appointed by the emperor to oversee taxation and customs collection; he also oversaw disputes among the merchants, in an attempt to restrain the foreigners from contacting the imperial government in Beijing directly. Architecture The Western merchants were allowed to occupy two- or three-story buildings set back about from the river. Each factory contained a number of houses. The warehouses occupied the ground floors; the upper floors were taken up by living areas. The square in front of the factories was fenced off, with Chinese access restricted. There were no wells or access to running water. Chinese servants were used to bring in drinking and wash water and to empty the factories' chamber pots. The facades of the buildings used Western classical designs, but the structures otherwise were merchant buildings of local style. The layout featured courtyards, long, narrow hallways, with rooms on either side. Construction materials were local, such as brick with tile roofs, but the windows and stairs came from British sources