Added script to remove input reference numbers.
Minor fixes in removing input reference numbers.