Refactoring workers

Thanks @heynemann