Initial version of export_csv(). load_hdf5() bug corrected.- Now loads appropriate intteger for mains_instance