Publish refactor