What unresolved conflict was made worse by adding more territory to the United States in the early to mid-1800s?