the hamlet took the first step to become independent: they asked it to become a freguesia. The request was eventually accepted in the same year, but the freguesia was disestablished in 1859 and re-joined to São Sebastião. The city kept on basing its economy on the production of sugar cane, coffee, tobacco and fishing. The local port was widely used to load ships with gold from Minas Gerais during the 17th and 18th centuries. It was also used by pirates and smugglers. When slavery was abolished, in 1888, and the railway linking São Paulo to the bigger Port of Santos was opened, the city's economy entered a period of crisis, and the population decreased. From that moment on, the city began to rely on subsistence agriculture and "handicraft fishing" (Pesca Artesanal), a type of fishing done entirely by hand from the fishing to consumption (in other words, no machinery is used, and most of the people who practice it do it for subsistence as well). Until the 1960s, nothing much changed. However, in that decade, Petrobras built its oil terminal, attracting new employees and investments. The population growth of the city grew wider and faster. While the city centre kept developing, workers migrating from other parts of Brazil built their houses near the Serra do Mar, establishing the neighborhood of Topolândia, which now is home to the lower-class families. São Sebastião became a tourist destination in the late 1980s, when the Rodovia Rio-Santos (a section of the BR-101 that connects Santos to Rio de Janeiro) was completed. Most of the lands were sold to countryside or paulistanas families who wished a house to spend the weekends and holidays on the coast. Most of the caiçaras (people who make a living out of fishing) started to work with tourism, even though a few of them still earn money from fishing. Until now, tourism plays an important role in the city's economy. However, as the city grew, proper water and sewage pipes have not been built for every building, which led to the lack of proper urban infrastructure in certain parts of the city. As of November 2010, less than 50% of the city's sewage received proper treatment. However, after a project by the government of the state of São Paulo called "Onda Limpa" (Clean Wave), the percentage of houses connected to sewage pipes went up to 94% as of January 2012.