Add functions to clear up global variants and local variants list in script.
Authored by: utunnels 2007-03-21
Parent: [r631]
Child: [r633]