What two things helped the United States industrialize at the end of the 1800s?