Clean up before publishing