Scheduling checks fixes and upgrades

Fixes a few things, adds a check, and fixes some query performance (which still has lots of big problems, I just fixed some of the easy ones).