cosmetic: clean up record functions
Fix #750, do a deeper copy for extra fields