Fixed couple bugs to do with argument passing in main()