cleaning up loose ends before publishing