Scheduler changes to allow multiple priority functions