Cleanup and preparation for publishing