Clean up publish-time code