General improvements to prepareRelease task.