start refactoring ScriptWidget