Minor changes to main()