Add comments for some codes in main()