pre-publishing cleanup