Move work queue routines to core.