Some improvements to version number handling.