What was built to protect the city from Confederates?