cleanup sched code.