Merge the three files basic, hdf and hdf2 together and make them generic to work with either one of them.