Improve checking for record changes
Whitespace, remove cruft