Rewrite combine to change defaults and get rid of array allocations.

Fixes #646.