Add constness to sched functions
Add HURDLE_VIOLATION()
fix some minor logic
change stack dump colour