Improvements to commenting and logging.