Updates to script file for better organization and to elim unneeded code.
Fixed a label reference on auto form.