Change records to structs