Main loop done.