GM is shedding factories and workers in an effort to restore profitability .