Added cooperative multitasking.