Refactoring in preparation for specifying g dependencies for scripts