How did conditions differ for African Americans before and after the civil war?