What led to the rapid growth of cities in the 19th century?