fixed conflict.
Converted andata to principally use caput.memh.
merged with copy from ch_util.
fixed conflicts.
Merge branch 'export_tmp' into export