Changed the structure of the worker to separate the job processing code from the worker shell.