Improve log messages and comments.