Many changes.

Started to make \produces have 3 inputs.