Created the main loop and printouts.