Add headerType param to writeCSV
cleaned up new mvMax5 variable