script removal functionality