cleaning js calls