The code now accepts only unsigned integers, and works for Uints of all sizes.