Add intermediate combining to save memory.