After the defeat of the Confederacy, President Andrew Johnson appointed a temporary state government under provisional governor Judge William Lewis Sharkey (1798–1873). It repealed the 1861 Ordinance of Secession and wrote new "Black Codes", defining and limiting the civil rights of freedmen, the former slaves. The whites tried to restrict the African Americans to a second-class status without citizenship or voting rights. Johnson was following the previously expressed policies of his predecessor, 16th President Abraham Lincoln. He had planned a generous and tolerating Reconstruction policy towards the former Confederates and southerners. He intended to grant citizenship and voting rights first to Black veterans, while slowly integrating the remainder of the freedmen into the political and economic life in the nation and the "new South".