Change read loop to step through groups not fields. Prep for code gen.