Refactoring script widgets and fixes script install per #1086