Add context switch callback (closes #28)