Move the multiple implementation of version to integers calculation to dedicated functions in one place.