Initial working version of the worker.