More generic functions for loading formats and format attribution from flat files.
Minor corrections in these functions to allow more flexibility in the file format.