makeWorker function

Make a worker object given a definition and data