Modified task switcher to make implementation of a new scheduler easier