Add cooperative multitasking framework