Refactoring the WorkService.

Defining a clear lifecycle.
Using the WorkContextImpl class to abstract state out of the service so so many parameters don't have to be passed around.

Overall the new implementation is much cleaner.