Revert "icp (generators)"

This reverts commit e2d3920993ff87a8c4157b8dc55faae047079490.
Revert "Revert "icp (generators)""

This reverts commit a181bcdd761232ecd73bcc2e9c7d81188d1df914.
refactor, segment union, const corr
fixes