Beginning to explain all of main loop.