Merged sched core with the one existing in dorimanx repo.