HOPKINS: Some code rework in ScriptManager