remove unused functions in script.