Rename some variables and functions, and use field punning in records