Add some doc to Sched function and move some functions to static