Added the use of program arguments and an unique main function in all the scripts.