Moved getting system arguments out of main function