Clean up UI and add logging.