Tracking down error messages in MAR (actually errors were due to mismatches in the order of the data).  But this code is cleaned up a bit.