Cleanup publish refactoring.