Scripting code cleanup (minor)