Cleanup code before publication