Remove trailing whitespace and fix formatting

This cleans up trailing whitespace and blank lines filled only with
tabs.