Who was the commander of the Confederacy army during the last year of the Civil War