Updated Priority scheduler to handle multilevel inheritance