Fix non-preemptive scheduler.
Merge low-level interrupt handlers into one function.