Cleanup: trailing whitespace and logging code.