Worker refactoring
Few more integration and unit tests