Code cleanup and small tweaks.

Globalized common log messages.