Appomattox campaign Confederate order of battle

The following Confederate States Army units and commanders fought in the final military encounter of the American Civil War, the 1865 Appomattox campaign, which lasted from March 29 to April 9 and resulted in Confederate surrender on April 9 at the Appomattox Court House. Order of battle has been compiled from the army organization during the campaign. The Union order of battle is listed separately.
Army of Northern Virginia.
Gen Robert E. Lee, Commanding
Staff:
First Corps.
LTG James Longstreet
Staff:
Second Corps.
MG John B. Gordon
Staff:
Third Corps.
LTG A. P. Hill (k, April 2)
Provost Guard
Fourth Corps.
LTG Richard H. Anderson
Cavalry Corps.
MG Fitzhugh Lee
Department of Richmond.
LTG Richard S. Ewell (c, April 6)
Ltc Thomas J. Spencer