The company said it would close four regional offices and take a $400 million charge related to the changes.