The majority of layoffs will happen by the end of the year.