Revert unneeded change
Optimize schedule sorting