What was the main purpose of slavery?