fix for issue where director would overwrite its own settings, scripts can now trigger events, fixed bug with script cleanup