Adds opts and cleans up for publishing.