implemented remove scriptlink logic