Keeping track of leases is made simpler by assigning the lease to a Job. Scheduler class now uses a state machine to decide what to do with the lease.