Refactor worker functions into coroWorker master class