Adding some utilities and restructuring to read HDF5 files