Term matrix marshall/unmarshall.