Refactor into simple publishing functions