Index: src/sas/sascalc/dataloader/readers/cansas_reader_HDF5.py
===================================================================
--- src/sas/sascalc/dataloader/readers/cansas_reader_HDF5.py	(revision 4fdcc659bc3efafa4310cdbe335d80ef80d1b7bb)
+++ src/sas/sascalc/dataloader/readers/cansas_reader_HDF5.py	(revision 2ca5d57bc4f8c564621aed80c21b30baf39fe4cc)
@@ -131,4 +131,6 @@
             value = data.get(key)
             class_name = h5attr(value, u'canSAS_class')
+            if isinstance(class_name, (list, tuple, np.ndarray)):
+                class_name = class_name[0]
             if class_name is None:
                 class_name = h5attr(value, u'NX_class')
@@ -538,6 +540,4 @@
             if dataset.data.ndim == 2:
                 (n_rows, n_cols) = dataset.data.shape
-                print(n_rows)
-                print(n_cols)
                 flat_qy = dataset.qy_data[0::n_cols].flatten()
                 if flat_qy[0] == flat_qy[1]:
@@ -548,8 +548,4 @@
                     flat_qx = np.transpose(dataset.qx_data)[0::n_rows].flatten()
                 dataset.x_bins = np.unique(flat_qx)
-                print(dataset.x_bins)
-                print(len(dataset.x_bins))
-                print(dataset.y_bins)
-                print(len(dataset.y_bins))
                 dataset.data = dataset.data.flatten()
                 dataset.qx_data = dataset.qx_data.flatten()
Index: src/sas/sascalc/file_converter/nxcansas_writer.py
===================================================================
--- src/sas/sascalc/file_converter/nxcansas_writer.py	(revision 4fdcc659bc3efafa4310cdbe335d80ef80d1b7bb)
+++ src/sas/sascalc/file_converter/nxcansas_writer.py	(revision 2ca5d57bc4f8c564621aed80c21b30baf39fe4cc)
@@ -8,8 +8,8 @@
 import os
 
-from sas.sascalc.dataloader.readers.cansas_reader_HDF5 import Reader as Cansas2Reader
+from sas.sascalc.dataloader.readers.cansas_reader_HDF5 import Reader
 from sas.sascalc.dataloader.data_info import Data1D, Data2D
 
-class NXcanSASWriter(Cansas2Reader):
+class NXcanSASWriter(Reader):
     """
     A class for writing in NXcanSAS data files. Any number of data sets may be
@@ -87,7 +87,9 @@
                     entry[names[2]].attrs['units'] = units
 
-        valid_data = all([issubclass(d.__class__, (Data1D, Data2D)) for d in dataset])
+        valid_data = all([issubclass(d.__class__, (Data1D, Data2D)) for d in
+                          dataset])
         if not valid_data:
-            raise ValueError("All entries of dataset must be Data1D or Data2D objects")
+            raise ValueError("All entries of dataset must be Data1D or Data2D"
+                             "objects")
 
         # Get run name and number from first Data object
@@ -145,5 +147,5 @@
                 sample_entry.create_dataset('details', data=details)
 
-        # Instrumment metadata
+        # Instrument metadata
         instrument_entry = sasentry.create_group('sasinstrument')
         instrument_entry.attrs['canSAS_class'] = 'SASinstrument'
@@ -175,29 +177,29 @@
         # Collimation metadata
         if len(data_info.collimation) > 0:
-            i = 1
-            for coll_info in data_info.collimation:
+            for i, coll_info in enumerate(data_info.collimation):
                 collimation_entry = instrument_entry.create_group(
-                    'sascollimation{0:0=2d}'.format(i))
+                    'sascollimation{0:0=2d}'.format(i + 1))
                 collimation_entry.attrs['canSAS_class'] = 'SAScollimation'
                 if coll_info.length is not None:
                     _write_h5_float(collimation_entry, coll_info.length, 'SDD')
-                    collimation_entry['SDD'].attrs['units'] = coll_info.length_unit
+                    collimation_entry['SDD'].attrs['units'] =\
+                        coll_info.length_unit
                 if coll_info.name is not None:
                     collimation_entry['name'] = _h5_string(coll_info.name)
         else:
-            # Create a blank one - at least 1 set of collimation metadata
-            # required by format
-            collimation_entry = instrument_entry.create_group('sascollimation01')
+            # Create a blank one - at least 1 collimation required by format
+            instrument_entry.create_group('sascollimation01')
 
         # Detector metadata
         if len(data_info.detector) > 0:
             i = 1
-            for det_info in data_info.detector:
+            for i, det_info in enumerate(data_info.detector):
                 detector_entry = instrument_entry.create_group(
-                    'sasdetector{0:0=2d}'.format(i))
+                    'sasdetector{0:0=2d}'.format(i + 1))
                 detector_entry.attrs['canSAS_class'] = 'SASdetector'
                 if det_info.distance is not None:
                     _write_h5_float(detector_entry, det_info.distance, 'SDD')
-                    detector_entry['SDD'].attrs['units'] = det_info.distance_unit
+                    detector_entry['SDD'].attrs['units'] =\
+                        det_info.distance_unit
                 if det_info.name is not None:
                     detector_entry['name'] = _h5_string(det_info.name)
@@ -205,6 +207,8 @@
                     detector_entry['name'] = _h5_string('')
                 if det_info.slit_length is not None:
-                    _write_h5_float(detector_entry, det_info.slit_length, 'slit_length')
-                    detector_entry['slit_length'].attrs['units'] = det_info.slit_length_unit
+                    _write_h5_float(detector_entry, det_info.slit_length,
+                                    'slit_length')
+                    detector_entry['slit_length'].attrs['units'] =\
+                        det_info.slit_length_unit
                 _write_h5_vector(detector_entry, det_info.offset)
                 # NXcanSAS doesn't save information about pitch, only roll
@@ -220,6 +224,4 @@
                     names=['x_pixel_size', 'y_pixel_size'],
                     write_fn=_write_h5_float, units=det_info.pixel_size_unit)
-
-                i += 1
         else:
             # Create a blank one - at least 1 detector required by format
@@ -229,53 +231,46 @@
 
         # Process meta data
-        if len(data_info.process) > 0 and not data_info.process[0].is_empty():
-            i = 1
-            for process in data_info.process:
-                process_entry = sasentry.create_group(
-                    'sasprocess{0:0=2d}'.format(i))
-                process_entry.attrs['canSAS_class'] = 'SASprocess'
-                if process.name:
-                    name = _h5_string(process.name)
-                    process_entry.create_dataset('name', data=name)
-                if process.date:
-                    date = _h5_string(process.date)
-                    process_entry.create_dataset('date', data=date)
-                if process.description:
-                    desc = _h5_string(process.description)
-                    process_entry.create_dataset('description', data=desc)
-                j = 1
-                for term in process.term:
-                    if term:
-                        h5_term = _h5_string(term)
-                        process_entry.create_dataset('term{0:0=2d}'.format(j),
-                                                     data=h5_term)
-                    j += 1
-                j = 1
-                for note in process.notes:
-                    if note:
-                        h5_note = _h5_string(note)
-                        process_entry.create_dataset('note{0:0=2d}'.format(j),
-                                                     data=h5_note)
-                    j += 1
-                i += 1
+        for i, process in enumerate(data_info.process):
+            process_entry = sasentry.create_group('sasprocess{0:0=2d}'.format(
+                i + 1))
+            process_entry.attrs['canSAS_class'] = 'SASprocess'
+            if process.name:
+                name = _h5_string(process.name)
+                process_entry.create_dataset('name', data=name)
+            if process.date:
+                date = _h5_string(process.date)
+                process_entry.create_dataset('date', data=date)
+            if process.description:
+                desc = _h5_string(process.description)
+                process_entry.create_dataset('description', data=desc)
+            for j, term in enumerate(process.term):
+                # Don't save empty terms
+                if term:
+                    h5_term = _h5_string(term)
+                    process_entry.create_dataset('term{0:0=2d}'.format(
+                        j + 1), data=h5_term)
+            for j, note in enumerate(process.notes):
+                # Don't save empty notes
+                if note:
+                    h5_note = _h5_string(note)
+                    process_entry.create_dataset('note{0:0=2d}'.format(
+                        j + 1), data=h5_note)
 
         # Transmission Spectrum
-        if len(data_info.trans_spectrum) > 0:
-            i = 1
-            for trans in data_info.trans_spectrum:
-                trans_entry = sasentry.create_group(
-                    'sastransmission_spectrum{0:0=2d}'.format(i))
-                trans_entry.attrs['canSAS_class'] = 'SAStransmission_spectrum'
-                trans_entry.attrs['signal'] = 'T'
-                trans_entry.attrs['T_axes'] = 'T'
-                trans_entry.attrs['name'] = trans.name
-                if trans.timestamp is not '':
-                    trans_entry.attrs['timestamp'] = trans.timestamp
-                transmission = trans_entry.create_dataset(
-                    'T', data=trans.transmission)
-                transmission.attrs['unertainties'] = 'Tdev'
-                trans_entry.create_dataset('Tdev',
-                                           data = trans.transmission_deviation)
-                trans_entry.create_dataset('lambda', data=trans.wavelength)
+        for i, trans in enumerate(data_info.trans_spectrum):
+            trans_entry = sasentry.create_group(
+                'sastransmission_spectrum{0:0=2d}'.format(i + 1))
+            trans_entry.attrs['canSAS_class'] = 'SAStransmission_spectrum'
+            trans_entry.attrs['signal'] = 'T'
+            trans_entry.attrs['T_axes'] = 'T'
+            trans_entry.attrs['name'] = trans.name
+            if trans.timestamp is not '':
+                trans_entry.attrs['timestamp'] = trans.timestamp
+            transmission = trans_entry.create_dataset('T',
+                                                      data=trans.transmission)
+            transmission.attrs['unertainties'] = 'Tdev'
+            trans_entry.create_dataset('Tdev',
+                                       data=trans.transmission_deviation)
+            trans_entry.create_dataset('lambda', data=trans.wavelength)
 
         note_entry = sasentry.create_group('sasnote'.format(i))
Index: test/sasdataloader/test/utest_cansas.py
===================================================================
--- test/sasdataloader/test/utest_cansas.py	(revision 7fd5e2abcc660d7481c92bbd68091179ecb0c4a8)
+++ test/sasdataloader/test/utest_cansas.py	(revision 2ca5d57bc4f8c564621aed80c21b30baf39fe4cc)
@@ -256,7 +256,7 @@
         self.datafile_basic = find("simpleexamplefile.h5")
         self.datafile_multiplesasentry = find(
+            "test_data//nxcansas_1Dand2D_multisasentry.h5")
+        self.datafile_multiplesasdata = find(
             "test_data//nxcansas_1Dand2D_multisasdata.h5")
-        self.datafile_multiplesasdata = find(
-            "test_data//nxcansas_1Dand2D_multisasentry.h5")
         self.datafile_multiplesasdata_multiplesasentry = find(
             "test_data//nxcansas_1Dand2D_multisasentry_multisasdata.h5")
@@ -277,4 +277,30 @@
             self._check_1d_data(self.data[1])
             self._check_2d_data(self.data[0])
+
+    def test_multiple_sasdatas(self):
+        self.data = self.loader.load(self.datafile_multiplesasdata)
+        self.assertTrue(len(self.data) == 2)
+        self._check_multiple_data(self.data[0])
+        self._check_multiple_data(self.data[1])
+        if isinstance(self.data[0], Data1D):
+            self._check_1d_data(self.data[0])
+            self._check_2d_data(self.data[1])
+        else:
+            self._check_1d_data(self.data[1])
+            self._check_2d_data(self.data[0])
+
+    def test_multiple_sasentries_multiplesasdatas(self):
+        self.data = self.loader.load(
+            self.datafile_multiplesasdata_multiplesasentry)
+        self.assertTrue(len(self.data) == 4)
+        self._check_multiple_data(self.data[0])
+        self._check_multiple_data(self.data[1])
+        self._check_multiple_data(self.data[2])
+        self._check_multiple_data(self.data[3])
+        for data in self.data:
+            if isinstance(data, Data1D):
+                self._check_1d_data(data)
+            else:
+                self._check_2d_data(data)
 
     def _check_multiple_data(self, data):
@@ -305,7 +331,6 @@
         self.assertTrue(len(data.q_data) == 150*150)
         self.assertTrue(len(data.q_data) == len(data.data))
-        print(data.err_data[10])
         self.assertAlmostEqual(data.err_data[10], 0.186723989418)
-        self.assertAlmostEqual(data.data[10], 0.465181425808)
+        self.assertAlmostEqual(data.data[10], 0.465181)
         self.assertAlmostEqual(data.qx_data[10], -0.129)
         self.assertAlmostEqual(data.qy_data[10], -0.149)
