refractoring worker components