Restructure and update segments