Refactor logging.
Update copyright.