refactor: cleanup worker set message handling code