Cleaning up integer conversions as per compiler warnings.