Split generator in two parts.