During the second half of the 1800s, the United States gained control of numerous territories in the West. Which event hastened this process?