tidy up trailing whitespace, add field titles