Cleanup: logging, whitespace, coding header, and linting.

* Convert logging calls that were using % instead of arguments to the logging
  function.
* Remove several places that had trailing whitespace.
* Standardize on a coding header and use it for all files.
* Fix a few linter errors.