Cleanup & improve logging.