Who was the commander of the Union Army at the end of the Civil War?