Refactor set_release_type