Make the worker thread api clearly seperated and ready for test harness
Refactoring to logically separate component modules in order to make it easier to develop tests, metrics, tracing, etc.