Refactor publisher