merge sections into nestable contents