Worker skeleton.
Implement the worker.
Fix undefined bug around the edges.
Merge branch 'worker'