Refactoring more of the local worker into abstract bits.