Various changes. Added the ability to give the input term via command line or a text file if the executable is run with its file name as an argument.