Refactor worker spec