Delete code which is no longer needed
Working condition. The script performs generally as expected -- extensive testing has not yet been undertaken.
Minor improvements can be made.