removed unused script lines, corrected some comments