What were the effects the factories had on the social conditions in this country(United States) in the 1800s?