General cleanup, some logging.