Added type field to read data structure.