New class DataFormat for dealing with various data formats.
Added some explanations.