Replace records with structs