Refactoring the publisher side