A major purpose of these laws was to preserve slavery. In the first two years after the Civil War, white dominated southern legislatures passed Black Codes modeled after the earlier slave codes. They were particularly concerned with controlling movement and labor, as slavery had given way to a free labor system.