Macroscheduling refactoring