Refactor worker