Cleanup before publish.