Got things working for the space data file up to the single index conversion.
However, it does not seem to be reading more than one line correctly from the input file...