What was a major factor of the War of 1812?