Was slavery the main cause of the civil war