Improved code for CSPS demographic data - complete header parse and reshape