Imporve the script

Add more documentation; Reword a few questions; Improve the intelligence of the script;