Refactor bump_version