Small refactoring of the publisher module