Start fixing the scheduler. Step 1: encapsulation