Cleaned up the logging.