Added arguments to main()
Changed some parameters for the return code