clean script code