Completed comments for main function.