Refactored nightly job and program scopes